<template>
    <div class="app-container">
      <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
        <el-form-item label="区域设备" prop="name">
          <el-input v-model="queryParams.name" placeholder="请输入区域设备" clearable size="small" @keyup.enter.native="handleQuery" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        </el-form-item>
      </el-form>
      <el-table  :data="dataTree" >    <!-- v-loading="loading" -->
        <el-table-column type="index" label="序号" align="center" :index="customeIndex" width="80"></el-table-column>
        <el-table-column label="区域设备称名称" align="center" prop="title" />
        <el-table-column label="内容" align="center" prop="content" />
        <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
          <template slot-scope="scope">
            <el-button    size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['evaluate:evalNorm:edit']">修改</el-button>
            <el-button size="mini" type="text" icon="el-icon-view" @click="handleDetails(scope.row)" >详情</el-button>
          </template>
        </el-table-column> -->
      </el-table>
      <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
        @pagination="getList" />
        <!-- <el-collapse v-model="activeName" @change="handleChange">
            <el-collapse-item  
                    v-for="(item,index) in dataTree"
                    :key="index"
                    :title="item.title"
                    :name="item.id">
                 <div>{{ item.content }}</div>
            </el-collapse-item>
         </el-collapse> -->
         <!-- 查看规范详情 -->
         <el-dialog title="设备规范详情" :visible.sync="detailsOpen" width="600px" append-to-body>
              <div>设备规范详情设备规范详情设备规范详情设备规范详情设备规范详情</div>
           <div slot="footer" class="dialog-footer">
             <el-button type="primary" @click="detailsOK">确 定</el-button>
             <el-button @click="cancel">取 消</el-button>
           </div>
         </el-dialog>
         <!-- 修改规范设置 -->
         <el-dialog title="设备规范修改" :visible.sync="open" width="600px" append-to-body>
           <el-input  type="textarea"  :rows="20" style="width: 100%;"   v-model="params.content" placeholder="请输入设备规范设" clearable size="small"  />
           <div slot="footer" class="dialog-footer">
             <el-button type="primary" @click="submitForm">确 定</el-button>
             <el-button @click="cancel">取 消</el-button>
           </div>
         </el-dialog>
    </div>
</template>
<script>
   import { facilityList,schoolID } from "@/api/qu/yssshesb";
   export default {
      name: "",
      data() {
        return {
          // loading:true,
            dataTree: [
                {title:'户外活动场地',content:'关于户外活动场地的规范的内容',id:'1'},
                {title:'教室及活动室（每班要求）',content:'关于教室及活动室（每班要求）的规范的内容',id:'2'},
                {title:'信息技术设备',content:'关于信息技术设备的规范的内容',id:'3'},
                {title:'户外活动场地',content:'关于户外活动场地的规范的内容',id:'4'},
                {title:'户外活动场地',content:'关于户外活动场地的规范的内容',id:'5'},
                {title:'户外活动场地',content:'关于户外活动场地的规范的内容',id:'6'},
                {title:'户外活动场地',content:'关于户外活动场地的规范的内容',id:'7'},
            ],
            activeName: [''],
            queryParams:{
              pageNum: 1,
              pageSize: 10,
            },
            total:0,
            detailsOpen:false,
            open:false,
            params:{

            },
        }
      },
      created() {},
      methods: {
        getList(){
            console.log('翻页');
        },
        handleChange(){

        },
         /** 搜索按钮操作 */
         handleQuery() {
          this.queryParams.pageNum = 1;
          // this.getList();
        },
          /** 重置按钮操作 */
          resetQuery() {
          this.resetForm("queryForm");
          // this.handleQuery();
        },
       // 序号
       customeIndex(index){
           return index+1+(this.queryParams.pageNum-1)*this.queryParams.pageSize
        },
        // 修改
        handleUpdate(){
          this.open=true
        },
        // 详情
        handleDetails(){
          this.detailsOpen=true
        },
         /** 提交按钮 */
         submitForm() {
          this.$refs["Form"].validate(valid => {
            if (valid) {
                console.log('修改成功');
                this.open=false;
            }
          });
        },
        // 取消按钮
        cancel() {
          this.open = false;
          this.params.content=''
        },
        detailsOK(){

        },
      },
    }
 </script>